Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly set insets for primary button #7061

Conversation

pinkisemils
Copy link
Collaborator

@pinkisemils pinkisemils commented Oct 24, 2024

The size of the secondary button wasn't being used to adjust the insets of the disconnect button. I've gone and done did make it do it now. Feel free to reject or suggest a better solution.

Since the inset rectangle is RTL aware, I presume this change would work there too? Or do we not display the reconnect button on the left in RTL locales?


This change is Reviewable

@pinkisemils pinkisemils force-pushed the center-the-text-of-the-connect-button-relative-to-the-whole-ios-906 branch from 433a926 to 5ca4db7 Compare October 24, 2024 08:53
@pinkisemils pinkisemils added the iOS Issues related to iOS label Oct 24, 2024
@pinkisemils pinkisemils force-pushed the center-the-text-of-the-connect-button-relative-to-the-whole-ios-906 branch from 5ca4db7 to 91e4df9 Compare October 24, 2024 10:50
Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pinkisemils)


ios/MullvadVPN/View controllers/Tunnel/DisconnectSplitButton.swift line 45 at r2 (raw file):

        }

        primaryButton.configuration?.contentInsets.leading += UIMetrics.DisconnectSplitButton.secondaryButton.width

Use the secondaryButtonSize var declared above instead.

@pinkisemils pinkisemils force-pushed the center-the-text-of-the-connect-button-relative-to-the-whole-ios-906 branch from 91e4df9 to b104096 Compare October 24, 2024 11:01
Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pinkisemils)

The size of the secondary button wasn't being used to adjust the insets
of the disconnect button. I've gone and done did make it do it now.
Feel free to reject or suggest a better solution.
@pinkisemils pinkisemils force-pushed the center-the-text-of-the-connect-button-relative-to-the-whole-ios-906 branch from b104096 to 7f09c7e Compare October 24, 2024 13:28
@pinkisemils pinkisemils merged commit 116793e into main Oct 24, 2024
8 of 10 checks passed
@pinkisemils pinkisemils deleted the center-the-text-of-the-connect-button-relative-to-the-whole-ios-906 branch October 24, 2024 13:29
Copy link

🚨 End to end tests failed. Please check the failed workflow run.

Copy link

🚨 End to end tests failed. Please check the failed workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issues related to iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants